<style>
    .cus-box{
        padding:0 10px;line-height:26px;background:#343739;
        position:absolute;top:0;right:0;z-index:9999;
    }
    .cus-btn{color:#B2B3B3;}
    .cus-btn:hover{color:#FFF;}
</style>

<div class="cus-box">
    <a class="cus-btn" href="javascript:location.reload()">刷新</a>
    <a class="cus-btn" href="javascript:CUS_LOGOUT()">退出</a>
</div>
<script>
    function CUS_LOGOUT(){
        var $xhr = new XMLHttpRequest();
        $xhr.open("GET", '/?logout', false);
        $xhr.onreadystatechange = function(){
            if($xhr.readyState!==4) return;
            history.replaceState('', '', '//'+location.host);
            location.reload();
        };
        $xhr.send(null);
    };
</script>
